package com.module.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author chengluqiang
 * @since 2019-03-04
 */
@Data
@Accessors(chain = true)
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;
    //@设置json参数别名，映射名称，UsErNamE 或者 全小写 username
    @JsonProperty(value = "UsErNamE")
    private String Username;
    private String password;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String ID = "id";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

	@Override
	public String toString() {
		return "User [username=" + Username + ", password=" + password + ", id=" + id + "]";
	}
}
